home *** CD-ROM | disk | FTP | other *** search
- class RedItemNomal extends ItemAction {
- private int cTime = 0;
-
- public RedItemNomal(StgFrame var1) {
- super(var1);
- }
-
- public void action(ItemIndex var1) {
- ColorItemIndex var2 = (ColorItemIndex)var1;
- int var3 = var2.getCount();
- int var4 = var2.getMax();
- SpriteAnimeIndex var5 = ((StgObjectIndex)var2).getSpriteAnimeIndex();
- ((StgObjectIndex)var1).movePosition(-65536, 0, 0);
- if (var3 > var4 / 2) {
- ((StgObjectIndex)var1).movePosition(0, -65536, 0);
- } else {
- ((StgObjectIndex)var1).movePosition(0, 65536, 0);
- }
-
- --var3;
- var2.setCount(var3);
- if (var3 == 0) {
- int var6 = 40 + (Fixed.Random() & 62);
- var2.setCount(var6);
- var2.setMax(var6);
- }
-
- ++this.cTime;
- if (this.cTime == 60) {
- ((ItemIndex)var2).setItemAction(new BlueItemNomal(super.resource));
- var5.setSpriteAnimeData(StgData.getSpriteAnimeBlueItem());
- }
-
- super.action(var1);
- }
-
- public void hitPlayer(ItemIndex var1, PlayerShipIndex var2) {
- SpriteAnimeIndex var3 = ((StgObjectIndex)var2).getSpriteAnimeIndex();
- Status var4 = super.resource.getStatus();
- ((ItemAction)this).putGetRedItem(var1);
- ColorItemScore var5 = super.resource.getYellowItemScore();
- ColorItemScore var6 = super.resource.getRedItemScore();
- ColorItemScore var7 = super.resource.getBlueItemScore();
- var5.setScore(200);
- var7.setScore(-200);
- var4.add(var6.getScore());
- var2.setColor(1);
- var2.setReflect(0);
- var3.setSpriteAnimeData(StgData.getSpriteAnimePlayerShipNomal());
- super.hitPlayer(var1, var2);
- }
- }
-